﻿using System ;

namespace OpenLightGroup.Common.ApplicationServices
{

    /// <summary>
    /// Represents a critical exception that needs to be logged.
    /// </summary>
    /// <remarks>
    /// Both constructors shown below are needed so that the WebEvent API 
    /// can see that this type should be handled as an ErrorEvent
    /// </remarks>
    public class CriticalErrorEvent : ErrorEvent
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CriticalErrorEvent" /> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="eventSource">The event source.</param>
        /// <param name="e">The exception.</param>
        protected CriticalErrorEvent(string message, object eventSource, Exception e)
        : base ( message, eventSource, 1, e )
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CriticalErrorEvent" /> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="eventSource">The event source.</param>
        /// <param name="eventDetailCode">The event detail code.</param>
        /// <param name="e">The exception.</param>        
        protected CriticalErrorEvent(string message,
                                object eventSource,
                                int eventDetailCode,
                                Exception e )
        : base ( message, eventSource, eventDetailCode, e )
        {
        }
    }
}